package com.ddwl.message.mapper;

import com.ddwl.common.dao.mapper.TkMapper;
import com.ddwl.message.model.MessageUser;
import com.ddwl.message.model.MessageUserList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface MessageUserMapper extends TkMapper<MessageUser> {

    List<MessageUserList> getListByUserId(@Param("userId")String userId);

    void  updateReadStatus(@Param("messageId")String messageId,@Param("userId")String userId);

    void insertByList(@Param("list") List<MessageUser> list);

    void deleteByMessageId(@Param("messageId")String messageId);

    List<MessageUserList> getHasRead(@Param("messageUser") MessageUser messageUser);

    void changeMessageInfoId(@Param("map") Map<String, String> map);
}